package org.yourorg.assassin
{
	import net.assassin.model.contributors.IItemContributor;
	
	import org.yourorg.views.details.UserView;
	import org.yourorg.vos.UserVoBase;

	[Bindable]
	[RemoteClass(alias="org.yourorg.xbiz.vo.UserVo")]
	
	/**
	 * To construct this class you should realize what does IItemContributor,IListContributor mean.
	 * 
	 * At first ListContributor is also a ItemContributor. By assassin framework, it will construct an list view for you.
	 * Evey ItemContributor is an item in the list view. The most importent different of ListContributor and ItemContributor is, 
	 * when you click the item which refers to a ListContributor, framework will display another list view.
	 * Because ListContributor has an attribute -- itemContributors, and the new list view will display itemContributors.
	 * If in itemContributors still has ListContributor in it, when you click the ListContributor, it will follow the same logic.
	 * Ok, back to the different of ListContributor and ItemContributor, if you click an item which refers to a ItemContributor, 
	 * assassin framework will open an new view and diplay ItemContributor's itemResource.
	 * 
	 * I bring all concepts from TourdeFlex for Android.
	 * 
	 * According to what I said above, a Data Object seams to be a ItemContributor.
	 * 
	 */ 
	public class UserVo extends UserVoBase implements IItemContributor
	{
		public function UserVo()
		{
		}
		
		
		
		private var _uid:uint;
		public var _name:String;
		private var _resource:Class;
		private var _icon:Object;
		
		public function get itemUid():uint
		{
			return _uid;
		}
		
		public function set itemUid(value:uint):void
		{
			_uid = value;
		}
		
		public function get itemName():String{
			return this.username +  "     Age : " + this.age ;
		}
		[Bindable] 
		public function set itemName(s:String):void{
			this._name = s;
		}
		
		public function get itemResource():Class
		{
			return UserView;
		}
		
		public function set itemResource(value:Class):void
		{
			_resource = value;
		}
		
		public function get itemIcon():Object
		{
			return this.photo;
		}
		
		public function set itemIcon(value:Object):void
		{
			_icon = value;
		}
		
	}
}